// index.js
// 获取应用实例
const app = getApp();
Page({
  data: {
    isplayingMusic:false,//现在正在播放（代表初始化的变量值）
  },
  bgm:null,
  music_url:"./images/3.mp3",
  music_coverImgUrl:"./images/music_play.png",
  onReady(){
    this.bgm=wx.getBackgroundAudioManager();
    this.bgm.title="水手";
    this.bgm.singer="李明";
    this.bgm.coverImgUrl=this.music_coverImgUrl;
    this.bgm.onCanplay(()=>{
      this.bgm.pause;
    })
    this.bgm.src=this.music_url;
  },
  play(e){
    if(this.data.isplayingMusic){
      this.bgm.pause();
    }else{
      this.bgm.play();
    }
    this.setData({
      isplayingMusic:!this.data.isplayingMusic
    })
  },
  callGroom(){
    wx.makePhoneCall({
      phoneNumber: '13715747997',
    })
  },
  callBride(){
    wx.makePhoneCall({
      phoneNumber: '13715747997',
    })
  }


})
  